<?php
$site=str_replace(' ','_',$_POST['site']);
include'../.db/connect.php';

$table='sitegeist';
$data=array('name'=>$site);
include'../.db/insert/data.php';

$table=$site.'_plugins';
$definition='id int not null auto_increment primary key,name varchar(56) not null,tag varchar(56),unique(tag)';
include'../.db/create/tablefromdefinition.php';

?><script type="text/javascript">alert('added site');</script><?php
header("Location: ../../../index2.php?site=$site&plugin=base&page=sites");
?>